package com.mall.controller;

import com.mall.commons.common.CommonResult;
import com.mall.model.domain.CmsPrefrenceArea;
import com.mall.service.PrefrenceAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/prefrenceArea")
public class PrefrenceAreaController {
    @Autowired
    private PrefrenceAreaService prefrenceAreaService;

    /**
     * 获取所有商品优选
     * @return
     */
    @GetMapping("/listAll")
    public CommonResult queryGoodAllProduct() {
        List<CmsPrefrenceArea> list = prefrenceAreaService.queryGoodAllProduct();
        return CommonResult.success(list);
    }
}
